<?php
namespace app\index\controller;
use x\Xbase;
use Endroid\QrCode\QrCode;
class T extends Xbase{

    function init(){
      // t(md5('sw@1234567890'));
      // $user = $this->db->find('user',1);
      // $img_path = m('userwx','c')->tbq($user);
      // t($img_path);
      $app =   m('weixin','c')->getApp();
      $rs = $this->db->query("select * from wx_media");
      foreach($rs as $v){
        unlink($v['path']);
        $this->db->delete('wx_media', $v['id']);
        $app->material->delete($v['media_id']);
      }
      t('end');
    }
}
